from meiduo_admin.mypackage import *

class ImageViewSet(ModelViewSet):
    queryset = SKUImage.objects.all()
    serializer_class = ImageSerializer
    pagination_class = MyPage

    @action(methods=['get'], detail=False)
    def simple(self, request):
        sku_queryset = SKU.objects.all()
        s = SKUSimpleSerializer(sku_queryset, many=True)
        return Response(s.data)